import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '../mainjing/home.vue'
import denglu from '../mainjing/denglu.vue'
import zhuce from '../mainjing/zhuce.vue'
import index from '../mainjing/index.vue'
import shoucang from '../mainjing/shoucang.vue'
import love from '../mainjing/love.vue'
import my from '../mainjing/my.vue'
import xiangqing from '../mainjing/xiangqing.vue'

Vue.use(VueRouter)

const routes = [
    {
    path: '/home',
    name: 'home',
    component: home,
    redirect:'/home/index',
    children:[
      {path: 'index',
      name: 'index',
      component: index
    },
    {path: 'shoucang',
      name: 'shoucang',
      component: shoucang
    },
    {path: 'love',
      name: 'love',
      component: love
    },
    {path: '/my',
      name: 'my',
      component: my
    },

    ]
     },
     {
      path: '/xiangqing',
      name: 'xiangqing',
      component: xiangqing
       },
     {
      path: '/denglu',
      name: 'denglu',
      component: denglu
       },
       {
        path: '/zhuce',
        name: 'zhuce',
        component: zhuce
         }
]

const router = new VueRouter({
  routes
})

export default router
